import request from '@/utils/request'

// 查询投诉记录列表
export function listComplaint(query) {
  return request({
    url: '/encounter/user/adminComplaintPage',
    method: 'get',
    params: query
  })
}

// 查询投诉记录详细
export function getComplaint(id) {
  return request({
    url: '/encounter/complaint/' + id,
    method: 'get'
  })
}

// 新增投诉记录
export function addComplaint(data) {
  return request({
    url: '/encounter/complaint',
    method: 'post',
    data: data
  })
}

// 修改投诉记录
export function updateComplaint(data) {
  return request({
    url: '/encounter/complaint',
    method: 'put',
    data: data
  })
}

// 删除投诉记录
export function delComplaint(id) {
  return request({
    url: '/encounter/complaint/' + id,
    method: 'delete'
  })
}

// 处理投诉
export function adminComplaintSave(data) {
  return request({
    url: '/encounter/user/adminComplaintSave',
    method: 'post',
    data: data
  })
}
